//
// Created by LiuYou on 2021/8/4.
//

//#ifndef LINUXENVIRONMENTPROGRAMMING_PROTO_HPP
//#define LINUXENVIRONMENTPROGRAMMING_PROTO_HPP
//
//
//class Proto {
//
//};
//
//
//#endif //LINUXENVIRONMENTPROGRAMMING_PROTO_HPP



#pragma once


#include <cstdint>
#include <ostream>


#define RCV_PORT            "1989"
#define NAME_SIZE           11
#define MC_GROUP            "224.2.2.2"


namespace SocketBasic {
    class Msg {
    public:
        friend std::ostream& operator<<(std::ostream& os, const Msg& msg);

    public:
        Msg(char* name, uint32_t math, uint32_t chinese);

        Msg();

    public:
        uint8_t name[NAME_SIZE]{};
        uint32_t math{};
        uint32_t chinese{};
    }__attribute__((packed));
    // 这里是告诉g++编译器不要对齐。
}
